package com.terren.spider.run;

import java.util.ArrayList;
import java.util.List;

import com.terren.spider.entity.core.Entry;
import com.terren.spider.run.basic.BasicSpiderRunner;

public class SpiderEntryRunner<T> extends BasicSpiderRunner<T>{
	private Integer entryId;
	
	public SpiderEntryRunner(Integer entryId) {
		super();
		this.entryId = entryId;
	}

	@Override
	public List<Entry> getEntrys() {
		List<Entry> entryList = new ArrayList<>();
		try {
			Entry entry = entryService.getEntryById(entryId);
			if (entry!=null) {
				entryList.add(entry);
			}
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		return entryList;
	}
}
